// pages/wxauth/wxauth.js
const app = getApp()
Page({
    data: {
        //判断小程序的API，回调，参数，组件等是否在当前版本可用。
        canIUse: wx.canIUse('button.open-type.getUserInfo')
    },
    onLoad: function () {
        var that = this;
    },
    bindGetUserInfo: function (e) {
        //console.log(e);
        if (e.detail.errMsg =='getUserInfo:ok') {
          app.globalData.userInfo = e.detail.userInfo;
          app.getfansinfo();
        }
        else{
          wx.redirectTo({
            url: '../myself/myself',
          }) 
        }
    }
})